<template>
  <div class="not-found">
    <div class="not-found-content">
      <h1>404</h1>
      <h2>页面不存在</h2>
      <p>您访问的页面不存在或已被删除</p>
      <el-button type="primary" @click="goHome">返回首页</el-button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';

const router = useRouter();

const goHome = () => {
  router.push('/');
};
</script>

<style lang="scss" scoped>
.not-found {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;

  &-content {
    text-align: center;

    h1 {
      font-size: 120px;
      color: var(--theme-color-primary);
      margin: 0;
      line-height: 1.2;
    }

    h2 {
      font-size: 30px;
      color: var(--theme-text-color);
      margin: 0 0 20px;
    }

    p {
      font-size: 16px;
      color: var(--theme-text-color);
      margin-bottom: 30px;
      opacity: 0.7;
    }
  }
}
</style>
